package com.situ.junit;

import java.sql.SQLException;
import java.util.List;

import org.junit.Test;

import com.situ.bean.StudentBean;
import com.situ.dao.StuDao;
import com.situ.service.StuException;

public class DBTest {
    
    @Test
    public void getAllStuTest() throws SQLException, StuException {
        StuDao stuDao = new StuDao();
        List<StudentBean> allStu = stuDao.getAllStu();
        if (allStu == null) {
            throw new StuException("没有返回结果");
        }
        for(StudentBean st : allStu) {
            System.out.println(st);
        }
    }

}
